fun main() {
    var str = "butterfly"
    //不然给非空类型赋值NULL
    //str = null
    println(str)


    var str02:String? = "butterfly02"
    str02 = null
    //let接管
    str02 = str02?.let{
        //非空白的字符串
        if(it.isNotBlank()) {
            it.capitalize()
        } else {
            "butterfly02"
        }
    }
    println(str02)

    //!!.
    var str03:String? = "butterfly03"
    str03 = null
    println(str03!!.capitalize())

    //if判断
    var str04:String? = "butterfly04"
    str04 = null
    if(str04 != null) {

    } else {

    }


    //?.空安全操作符，可链式调用
    str04?.capitalize()?.plus("is great")

    //空合并操作符
    println(str04?:"jack")



}